
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta charset="utf-8" />
    <title>calc_dislocation_SDVPN.py &#8212; iprPy 0.10.2 documentation</title>
    <link rel="stylesheet" href="../../_static/basic.css" type="text/css" />
    <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
    <script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
    <script type="text/javascript" src="../../_static/jquery.js"></script>
    <script type="text/javascript" src="../../_static/underscore.js"></script>
    <script type="text/javascript" src="../../_static/doctools.js"></script>
    <script type="text/javascript" src="../../_static/language_data.js"></script>
    <script crossorigin="anonymous" integrity="sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script>
    <script async="async" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
    <script type="text/x-mathjax-config">MathJax.Hub.Config({"tex2jax": {"inlineMath": [["$", "$"], ["\\(", "\\)"]], "processEscapes": true, "ignoreClass": "document", "processClass": "math|output_area"}})</script>
    <link rel="index" title="Index" href="../../genindex.html" />
    <link rel="search" title="Search" href="../../search.html" />
    <link rel="next" title="dislocation_monopole" href="../dislocation_monopole/index.html" />
    <link rel="prev" title="Input script parameters" href="parameters.html" /> 
  </head><body>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="../dislocation_monopole/index.html" title="dislocation_monopole"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="parameters.html" title="Input script parameters"
             accesskey="P">previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="../../index.html">iprPy 0.10.2 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="../../calculation_styles.html" >Calculation Styles</a> &#187;</li>
          <li class="nav-item nav-item-2"><a href="index.html" accesskey="U">dislocation_SDVPN</a> &#187;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <div class="section" id="calc-dislocation-sdvpn-py">
<h1>calc_dislocation_SDVPN.py<a class="headerlink" href="#calc-dislocation-sdvpn-py" title="Permalink to this headline">¶</a></h1>
<div class="section" id="module-iprPy.calculation.dislocation_SDVPN.calc_dislocation_SDVPN">
<span id="calculation-script-functions"></span><h2>Calculation script functions<a class="headerlink" href="#module-iprPy.calculation.dislocation_SDVPN.calc_dislocation_SDVPN" title="Permalink to this headline">¶</a></h2>
<dl class="function">
<dt id="iprPy.calculation.dislocation_SDVPN.calc_dislocation_SDVPN.main">
<code class="sig-name descname">main</code><span class="sig-paren">(</span><em class="sig-param">*args</em><span class="sig-paren">)</span><a class="headerlink" href="#iprPy.calculation.dislocation_SDVPN.calc_dislocation_SDVPN.main" title="Permalink to this definition">¶</a></dt>
<dd><p>Main function called when script is executed directly.</p>
</dd></dl>

<dl class="function">
<dt id="iprPy.calculation.dislocation_SDVPN.calc_dislocation_SDVPN.peierlsnabarro">
<code class="sig-name descname">peierlsnabarro</code><span class="sig-paren">(</span><em class="sig-param">ucell, C, burgers, ξ_uvw, slip_hkl, gamma, m=[0, 1, 0], n=[0, 0, 1], cutofflongrange=1000.0, tau=array([[0., 0., 0.],        [0., 0., 0.],        [0., 0., 0.]]), alpha=[0.0], beta=array([[0., 0., 0.],        [0., 0., 0.],        [0., 0., 0.]]), cdiffelastic=False, cdiffsurface=True, cdiffstress=False, fullstress=True, halfwidth=1.0, normalizedisreg=True, xnum=None, xmax=None, xstep=None, xscale=False, min_method='Powell', min_options={}, min_cycles=10</em><span class="sig-paren">)</span><a class="headerlink" href="#iprPy.calculation.dislocation_SDVPN.calc_dislocation_SDVPN.peierlsnabarro" title="Permalink to this definition">¶</a></dt>
<dd><p>Solves a Peierls-Nabarro dislocation model.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>ucell</strong> (<em>atomman.System</em>) – The unit cell to use as the seed for the dislocation system.  Note that
only box information is used and not atomic positions.</p></li>
<li><p><strong>C</strong> (<em>atomman.ElasticConstants</em>) – The elastic constants associated with the bulk crystal structure
for ucell.</p></li>
<li><p><strong>burgers</strong> (<em>array-like object</em>) – The dislocation’s Burgers vector given as a Miller or
Miller-Bravais vector relative to ucell.</p></li>
<li><p><strong>ξ_uvw</strong> (<em>array-like object</em>) – The dislocation’s line direction given as a Miller or
Miller-Bravais vector relative to ucell.</p></li>
<li><p><strong>slip_hkl</strong> (<em>array-like object</em>) – The dislocation’s slip plane given as a Miller or Miller-Bravais
plane relative to ucell.</p></li>
<li><p><strong>m</strong> (<em>array-like object</em><em>, </em><em>optional</em>) – The m unit vector for the dislocation solution.  m, n, and ξ
(dislocation line) should be right-hand orthogonal.  Default value
is [0,1,0] (y-axis).</p></li>
<li><p><strong>n</strong> (<em>array-like object</em><em>, </em><em>optional</em>) – The n unit vector for the dislocation solution.  m, n, and ξ
(dislocation line) should be right-hand orthogonal.  Default value
is [0,0,1] (z-axis). n is normal to the dislocation slip plane.</p></li>
<li><p><strong>cutofflongrange</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.8)"><em>float</em></a><em>, </em><em>optional</em>) – The cutoff distance to use for computing the long-range energy.
Default value is 1000 angstroms.</p></li>
<li><p><strong>tau</strong> (<em>numpy.ndarray</em><em>, </em><em>optional</em>) – A (3,3) array giving the stress tensor to apply to the system
using the stress energy term.  Only the xy, yy, and yz components
are used.  Default value is all zeros.</p></li>
<li><p><strong>alpha</strong> (<em>list of float</em><em>, </em><em>optional</em>) – The alpha coefficient(s) used by the nonlocal energy term.  Default
value is [0.0].</p></li>
<li><p><strong>beta</strong> (<em>numpy.ndarray</em><em>, </em><em>optional</em>) – The (3,3) array of beta coefficient(s) used by the surface energy
term.  Default value is all zeros.</p></li>
<li><p><strong>cdiffelastic</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.8)"><em>bool</em></a><em>, </em><em>optional</em>) – Flag indicating if the dislocation density for the elastic energy
component is computed with central difference (True) or simply
neighboring values (False).  Default value is False.</p></li>
<li><p><strong>cdiffsurface</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.8)"><em>bool</em></a><em>, </em><em>optional</em>) – Flag indicating if the dislocation density for the surface energy
component is computed with central difference (True) or simply
neighboring values (False).  Default value is True.</p></li>
<li><p><strong>cdiffstress</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.8)"><em>bool</em></a><em>, </em><em>optional</em>) – Flag indicating if the dislocation density for the stress energy
component is computed with central difference (True) or simply
neighboring values (False).  Only matters if fullstress is True.
Default value is False.</p></li>
<li><p><strong>fullstress</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.8)"><em>bool</em></a><em>, </em><em>optional</em>) – Flag indicating which stress energy algorithm to use.  Default
value is True.</p></li>
<li><p><strong>halfwidth</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.8)"><em>float</em></a><em>, </em><em>optional</em>) – A dislocation halfwidth guess to use for generating the initial
disregistry guess.  Does not have to be accurate, but the better the
guess the fewer minimization steps will likely be needed.  Default
value is 1 Angstrom.</p></li>
<li><p><strong>normalizedisreg</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.8)"><em>bool</em></a><em>, </em><em>optional</em>) – If True, the initial disregistry guess will be scaled such that it
will have a value of 0 at the minimum x and a value of burgers at the
maximum x.  Default value is True.  Note: the disregistry of end points
are fixed, thus True is usually preferential.</p></li>
<li><p><strong>xnum</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.8)"><em>int</em></a><em>, </em><em>optional</em>) – The number of x value points to use for the solution.  Two of xnum,
xmax, and xstep must be given.</p></li>
<li><p><strong>xmax</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.8)"><em>float</em></a><em>, </em><em>optional</em>) – The maximum value of x to use.  Note that the minimum x value will be
-xmax, thus the range of x will be twice xmax.  Two of xnum, xmax, and
xstep must be given.</p></li>
<li><p><strong>xstep</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.8)"><em>float</em></a><em>, </em><em>optional</em>) – The delta x value to use, i.e. the step size between the x values used.
Two of xnum, xmax, and xstep must be given.</p></li>
<li><p><strong>xscale</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.8)"><em>bool</em></a><em>, </em><em>optional</em>) – Flag indicating if xmax and/or xstep values are to be taken as absolute
or relative to ucell’s a lattice parameter.  Default value is False,
i.e. the x parameters are absolute and not scaled.</p></li>
<li><p><strong>min_method</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.8)"><em>str</em></a><em>, </em><em>optional</em>) – The scipy.optimize.minimize method to use.  Default value is
‘Powell’.</p></li>
<li><p><strong>min_options</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.8)"><em>dict</em></a><em>, </em><em>optional</em>) – Any options to pass on to scipy.optimize.minimize. Default value
is {}.</p></li>
<li><p><strong>min_cycles</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.8)"><em>int</em></a><em>, </em><em>optional</em>) – The number of minimization runs to perform on the system.  Restarting
after obtaining a solution can help further refine to the best pathway.
Default value is 10.</p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="function">
<dt id="iprPy.calculation.dislocation_SDVPN.calc_dislocation_SDVPN.process_input">
<code class="sig-name descname">process_input</code><span class="sig-paren">(</span><em class="sig-param">input_dict</em>, <em class="sig-param">UUID=None</em>, <em class="sig-param">build=True</em><span class="sig-paren">)</span><a class="headerlink" href="#iprPy.calculation.dislocation_SDVPN.calc_dislocation_SDVPN.process_input" title="Permalink to this definition">¶</a></dt>
<dd><p>Processes str input parameters, assigns default values if needed, and
generates new, more complex terms as used by the calculation.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>input_dict</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.8)"><em>dict</em></a>) – Dictionary containing the calculation input parameters with string
values.  The allowed keys depends on the calculation style.</p></li>
<li><p><strong>UUID</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.8)"><em>str</em></a><em>, </em><em>optional</em>) – Unique identifier to use for the calculation instance.  If not
given and a ‘UUID’ key is not in input_dict, then a random UUID4
hash tag will be assigned.</p></li>
<li><p><strong>build</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.8)"><em>bool</em></a><em>, </em><em>optional</em>) – Indicates if all complex terms are to be built.  A value of False
allows for default values to be assigned even if some inputs
required by the calculation are incomplete.  (Default is True.)</p></li>
</ul>
</dd>
</dl>
</dd></dl>

</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
  <h3><a href="../../index.html">Table of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">calc_dislocation_SDVPN.py</a><ul>
<li><a class="reference internal" href="#module-iprPy.calculation.dislocation_SDVPN.calc_dislocation_SDVPN">Calculation script functions</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="parameters.html"
                        title="previous chapter">Input script parameters</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="../dislocation_monopole/index.html"
                        title="next chapter">dislocation_monopole</a></p>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="../dislocation_monopole/index.html" title="dislocation_monopole"
             >next</a> |</li>
        <li class="right" >
          <a href="parameters.html" title="Input script parameters"
             >previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="../../index.html">iprPy 0.10.2 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="../../calculation_styles.html" >Calculation Styles</a> &#187;</li>
          <li class="nav-item nav-item-2"><a href="index.html" >dislocation_SDVPN</a> &#187;</li> 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.1.2.
    </div>
  </body>
</html>